-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
⚠️ Allow reconcilers to add watches dynamically #542
Conversation
Welcome @ncdc! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/assign @DirectXMan12
replied a bit on the linked issue. |
/hold (see the linked issue) |
@DirectXMan12 I've pushed up the changes we discussed yesterday. For the time being, I've kept in my original injector commit along with another commit that reverts it (just in case we decided to go back to it 😄). Once you're happy with the new changes, I'll rebase and remove the injector commits. |
LGTM |
pkg/builder/controller.go
Outdated
@@ -138,26 +135,24 @@ func (blder *Builder) Named(name string) *Builder { | |||
// Complete builds the Application ControllerManagedBy. | |||
func (blder *Builder) Complete(r reconcile.Reconciler) error { | |||
_, err := blder.Build(r) | |||
return err | |||
if err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change isn't necessary. The error is already being handled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted
can you just drop the otherwise LGTM |
Return controller from builder.Build to allow developers to use it after it's been created by the builder; e.g., to add watches dynamically from a reconciler. Remove deprecated SimpleController() and Builder.WithManager(). Signed-off-by: Andy Goldstein <[email protected]>
@DirectXMan12 I removed |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: DirectXMan12, ncdc The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
(added |
/hold cancel |
🐛 report error if GOPATH env is missing
Allow reconcilers to add watches dynamically by getting a handle to the controller created by the builder via
Build
(changes the signature ofBuild
).Fixes #540